package ru.sh.screen;

import javax.microedition.khronos.opengles.GL10;

import android.hardware.SensorEvent;
import android.view.MotionEvent;

import ru.sh.bg.MenuBg;
import ru.sh.ui.MenuUI;

import framework.Game;
import framework.GameCamera;
import framework.GameScreen;

public class SHMenuScreen extends GameScreen {

	private MenuBg menuBg;
	private MenuUI menuUI;
	
	public SHMenuScreen(Game game) {
		super(game);
	}

	@Override
	protected void initScreenObjects() {
		menuBg = new MenuBg(GameCamera.CAMERA_WIDTH / 2,  GameCamera.CAMERA_HEIGHT / 2);
		menuUI = new MenuUI(this);
	}

	@Override
	public void present(GL10 gl, float deltaTime) {
		menuBg.draw(gl, deltaTime);
		menuUI.draw(gl, deltaTime);
	}

	@Override
	public void update(float deltaTime) {
		// TODO Auto-generated method stub

	}

	@Override
	public void handleTouchEvent(MotionEvent event) {
		menuUI.handle(event);
	}

	@Override
	public void handleAccelerometerEvent(SensorEvent event) {
		// TODO Auto-generated method stub
		
	}

}
